﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Core.exception
{
    [Serializable]
    public  class LotException:Exception
    {
        /// <summary>
        /// 
        /// </summary>
        public LotException() { }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        public LotException(string message) : base(message)
        {
            ErrorMessage = message;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected LotException(SerializationInfo info, StreamingContext context)
        {
            ErrorMessage = info.GetString("ErrorMessage");
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
            info.AddValue("ErrorMessage", ErrorMessage);
        }

        /// <summary>
        /// 异常信息
        /// </summary>
        public string ErrorMessage { get; private set; }
    }
  

}
